import com.my.Config.RootConfig;
import com.my.bean.User;
import com.my.mapper.helloMapper;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.core.io.ClassPathResource;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;

public class text {

      @Test
        public void text() throws FileNotFoundException {

        ApplicationContext applicationContext=new AnnotationConfigApplicationContext(RootConfig.class);

        helloMapper bean = applicationContext.getBean(helloMapper.class);

        List<User> getuser = bean.getuser(1);
        for (User user : getuser) {
          System.out.println(user);
        }

      }

          @Test
            public void text1() throws IOException {

            ClassPathResource classPathResources = new ClassPathResource("classpath:mybatis.Mapper");
            System.out.println(classPathResources.getFile().getAbsolutePath());
      }

          @Test
            public void text2(){

            System.out.println((ClassLoader) null);
          }
      }
